package com.wwwarehouse.taskcenter.fragment.warehouse_handover;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.wwwarehouse.common.activity.base.BaseFragment;
import com.wwwarehouse.common.custom_widget.button.StateButton;
import com.wwwarehouse.taskcenter.R;

/**
 * @创建者 chenchao.
 * @创建时间 2017/11/27 14:12
 * @描述 ${TODO}
 */

public class ScanTemporaryAreaFragment extends BaseFragment implements View.OnClickListener {

    private View mView;
    private StateButton mBtConnected;
    private TextView mTvCarCode;
    private TextView mTvGoodNum;
    private StateButton mBtWerehouseDetail;
    private TextView mTvTempNum;
    private StateButton mBtDetail;
    private TextView mTvTempCode;
    private StateButton mBtNext;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        mView = inflater.inflate(R.layout.fragment_scan_temp_area, container, false);
        initView();
        return mView;
    }

    private void initView() {

        mBtConnected = findView(mView, R.id.bt_connected);
        mTvCarCode = findView(mView, R.id.tv_car_code);
        mTvGoodNum = findView(mView, R.id.tv_good_num);
        mBtWerehouseDetail = findView(mView, R.id.bt_warehouse_detail);
        mTvTempNum = findView(mView, R.id.tv_temp_num);
        mBtDetail = findView(mView, R.id.bt_detail);
        mTvTempCode = findView(mView, R.id.tv_temp_code);
        mBtNext = findView(mView, R.id.bt_next);

        mBtConnected.setOnClickListener(this);
        mBtWerehouseDetail.setOnClickListener(this);
        mBtDetail.setOnClickListener(this);
    }

    @Override
    public void setTitle() {
        if (peekFragment() instanceof ScanTemporaryAreaFragment) {
            mActivity.setTitle(R.string.task_enter_work_code_scan_temp);
        }
    }

    @Override
    public void requestDatas() {

    }

    @Override
    public void onClick(View v) {
        int id = v.getId();
        if (id == R.id.bt_connected) {

        } else if (id == R.id.bt_warehouse_detail) {

        } else if (id == R.id.tv_details) {

        } else if (id == R.id.bt_next) {

        }
    }
}
